<template>
  <div class="header">
    <div class="iconfont back-icon" @click="handleIconClick">&#xe609;</div>
    <div class="title">{{title}}</div>
  </div>
</template>
<script>
export default {
  name: 'Header',
  props: {
    title: String
  },
  methods: {
    handleIconClick () {
      this.$router.go(-1)
    }
  }
}
</script>
<style lang="stylus" scoped>
  .header
    width: 100%
    height: .5rem
    background: #228fbd
    position:fixed
    z-index: 1000
    top: 0
    left: 0
    .back-icon
      width: .40rem
      color: #fff
      font-size: .25rem
      text-align: center
      padding: .1rem 0
      margin-left: .05rem
      float:left
    .title
      height: 0.6rem
      line-height: .5rem
      width: 1.5rem
      text-align: center
      color: #fff
      margin: 0 auto
      font-size: .25rem
</style>
